﻿var customPrintJson = {
    "panels": [{
        "index": 0,
        "height": 297,
        "width": 210,
        "paperHeader": 49.5,
        "paperFooter": 780,
        "printElements": [
            // 标题
            {
                "options": {
                    "left": 175.5,
                    "top": 10,
                    "height": 27,
                    "width": 259,
                    "title": "采购入库详情打印",
                    "fontSize": 19,
                    "fontWeight": "600",
                    "textAlign": "center",
                },
                "printElementType": {
                    "title": "自定义文本",
                    "type": "text"
                }
            },
            // 竖线
            {
                "options": {
                    "left": 25.5,
                    "top": 75,
                    "height": 705,
                    "width": 9,
                    "fixed": true,
                    "borderStyle": "dotted"
                },
                "printElementType": {
                    "type": "vline"
                }
            },
            // 单据编码
            {
                "options": {
                    "left": 50,
                    "top": 100,
                    "height": 13,
                    "width": 120,
                    "title": "单据编码",
                    "field": "id",
                    "textAlign": "center",
                },
                "printElementType": {
                    "title": "文本",
                    "type": "text"
                }
            },
            //客户名称
            {
                "options": {
                    "left": 180,
                    "top": 100,
                    "height": 13,
                    "width": 120,
                    "title": "操作员",
                    "field": "oprator",
                    "textAlign": "center",
                },
                "printElementType": {
                    "title": "文本",
                    "type": "text"
                }
            },
            //发货单号
            {
                "options": {
                    "left": 310,
                    "top": 100,
                    "height": 13,
                    "width": 120,
                    "title": "到货单号",
                    "field": "arivalNumber",
                    "textAlign": "center",
                },
                "printElementType": {
                    "title": "文本",
                    "type": "text"
                }
            },
            //审批人
            {
                "options": {
                    "left": 50,
                    "top": 170,
                    "height": 13,
                    "width": 120,
                    "title": "地址",
                    "field": "examUserName",
                    "textAlign": "center",
                },
                "printElementType": {
                    "title": "文本",
                    "type": "text"
                }
            },
            //单据日期
            {
                "options": {
                    "left": 180,
                    "top": 170,
                    "height": 13,
                    "width": 120,
                    "title": "单据日期",
                    "field": "documentDate",
                    "textAlign": "center",
                },
                "printElementType": {
                    "title": "文本",
                    "type": "text"
                }
            },
            // 备注
            {
                "options": {
                    "left": 310,
                    "top": 170,
                    "height": 13,
                    "width": 51,
                    "title": "备注",
                    "field": "remark",
                    "textAlign": "center",
                },
                "printElementType": {
                    "title": "自定义文本",
                    "type": "text"
                }
            },
            //
            // 表格
            {
                "options": {
                    "left": 50,
                    "top": 200,
                    "height": 44,
                    "width": 511.5,
                    "field": "orderMaterials",
                    "columns": [
                        [{
                            "width": 85.25,
                            "colspan": 1,
                            "rowspan": 1
                        }, {
                            "title": "物料编码",
                            "field": "materialsCode",
                            "width": 85.25,
                            "align": "center",
                            "colspan": 1,
                            "rowspan": 1
                        }, {
                            "title": "物料名称",
                            "field": "materialsName",
                            "width": 85.25,
                            "align": "center",
                            "colspan": 1,
                            "rowspan": 1
                        }, {
                            "title": "规格",
                            "field": "modelSpecification",
                            "width": 85.25,
                            "align": "center",
                            "colspan": 1,
                            "rowspan": 1
                        }, {
                            "title": "计量",
                            "field": "calulate",
                            "width": 85.25,
                            "align": "center",
                            "colspan": 1,
                            "rowspan": 1
                        }, {
                            "title": "颜色",
                            "field": "color",
                            "width": 85.25,
                            "align": "center",
                            "colspan": 1,
                            "rowspan": 1
                        }, {
                            "title": "数量",
                            "field": "calulateNumber",
                            "width": 85.25,
                            "align": "center",
                            "colspan": 1,
                            "rowspan": 1
                        }, {
                            "title": "单价",
                            "field": "price",
                            "width": 85.25,
                            "align": "center",
                            "colspan": 1,
                            "rowspan": 1
                        }, {
                            "title": "总价",
                            "field": "totalPrice",
                            "width": 85.25,
                            "align": "center",
                            "colspan": 1,
                            "rowspan": 1
                        },]
                    ]
                },
                "printElementType": {
                    "title": "表格",
                    "type": "tableCustom",
                    //"footerFormatter": function (options, rows, data, currentPageGridRowsData) {
                    //    return "<tr><td>" + currentPageGridRowsData.length + "</td></tr>"
                    //}
                }
            }
        ],
        "paperNumberLeft": 565.5,
        "paperNumberTop": 819
    }]
}